cmake_minimum_required(VERSION 3.10.2)

project("compilelibjpeg")


#批量导入源文件
file(GLOB source_files *.cpp)

#配置头文件查找路径
include_directories(include)

add_library(compressorJpeg
        SHARED
        ${source_files})

#配置导入libs文件夹下的库文件查找路径
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}")
# 查找JNI图形库
find_library(
        jnigraphics-lib
        jnigraphics)
# 查找JNI日志库
find_library(log-lib log)

target_link_libraries(
        compressorJpeg
        #添加图片库
        turbojpeg
        ${jnigraphics-lib}
        ${log-lib})